package proxy;

/**
 * @author 刘正星
 * @version 1.0.0
 * @ClassName CountProxy.java
 * @Description TODO
 * @createTime 2021年06月29日 22:42:00
 */
public class CountProxy implements Count{

    private CountImpl countImpl;

    public CountProxy(CountImpl countImpl) {
        this.countImpl = countImpl;
    }

    @Override
    public void queryCount() {
        System.out.println("代理之前");
        countImpl.queryCount();
        System.out.println("代理之后");
    }

    @Override
    public void updateCount() {
        System.out.println("代理之前");
        countImpl.updateCount();
        System.out.println("代理之后");

    }
}
